f = open('D:/a.txt', 'r', encoding='UTF-8')
print(type(f))
# content = f.read()
# content = f.readlines()
# print(content)

# line1 = f.readline()
# line2 = f.readline()
# print(line1)
# print(line2)
i = 1
with open("D:/a.txt", 'r', encoding="UTF-8") as f:
    for line in f:
        print(f"第{i}行数据为：{line}")
        i += 1
# f.close()
